package com.chis.hash;

import com.google.common.hash.Hashing;

import java.nio.charset.StandardCharsets;

public class Test {

    public static String murmur3Test(String primaryKey) {
        return Hashing.murmur3_32().hashString(primaryKey, StandardCharsets.UTF_8).toString().substring(0, 4) +
                "_" + primaryKey;
    }

    public static void main(String[] args) {
        String str="3202020103002250";
        System.out.println(murmur3Test(str));
        System.out.println(murmur3Test(str));
        System.out.println(murmur3Test(str));
    }


}
